home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-3.98 / bfd / Makefile.in < prev    next >
Encoding:
Makefile  |  1991-08-01  |  7.1 KB  |  270 lines

  1. #    Makefile template for Configure for the BFD library.
  2. #    Copyright (C) 1990-1991 Free Software Foundation, Inc.
  3. #    Written by Cygnus Support.
  4. # This file is part of BFD, the Binary File Descriptor library.
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. # $Id: Makefile.in,v 1.27 1991/07/31 17:37:02 gnu Exp $
  18.  
  19. srcdir = .
  20. destdir = /usr/local
  21. libdir = $(destdir)/lib
  22.  
  23. RANLIB = ranlib
  24. AR = ar
  25. AR_FLAGS = clq
  26. INCDIR = $(srcdir)/../include
  27. CSEARCH = -I$(INCDIR)
  28. DEP = mkdep
  29. #### host and target dependent Makefile fragments come in here.
  30. ###
  31.  
  32. TARGETLIB = libbfd.a
  33. CFLAGS = -g $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) # -DINTEL960VERSION
  34.  
  35.  
  36. BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \
  37.     archures.o core.o section.o format.o syms.o reloc.o
  38.  
  39. BFD_BACKENDS = oasys.o ieee.o srec.o \
  40.     aout64.o aout32.o demo64.o sunos.o newsos3.o bout.o \
  41.     icoff.o m68kcoff.o i386coff.o m88k-bcs.o ecoff.o \
  42.     # trad-core.o 
  43.  
  44. BFD_H=$(INCDIR)/bfd.h
  45. SYSDEP_H=$(INCDIR)/sysdep.h
  46.  
  47. # C source files that correspond to .o's.
  48. CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \
  49.      i386coff.c aout64.c aout32.c sunos.c demo64.c icoff.c srec.c \
  50.      oasys.c ieee.c m68kcoff.c \
  51.      format.c section.c core.c syms.c reloc.c \
  52.      m88k-bcs.c ecoff.c trad-core.c newsos3.c bout.c
  53.  
  54. STAGESTUFF = $(TARGETLIB) $(OFILES)
  55.  
  56. all: $(TARGETLIB) 
  57.  
  58. # XDEPFILES comes from the host config; TDEPFILES from the target config.
  59. OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(XDEPFILES) $(TDEPFILES)
  60.  
  61. $(TARGETLIB): $(OFILES)
  62.      rm -f $(TARGETLIB)
  63.      $(AR) $(AR_FLAGS) $(TARGETLIB) $(OFILES)
  64.      $(RANLIB) $(TARGETLIB)
  65.  
  66. stage1: force
  67.     - mkdir stage1
  68.     - mv -f $(STAGESTUFF) stage1
  69.  
  70. stage2: force
  71.     - mkdir stage2
  72.     - mv -f $(STAGESTUFF) stage2
  73.  
  74. stage3: force
  75.     - mkdir stage3
  76.     - mv -f $(STAGESTUFF) stage3
  77.  
  78. against=stage2
  79.  
  80. comparison: force
  81.     for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
  82.  
  83. de-stage1: force
  84.     - (cd stage1 ; mv -f $(STAGESTUFF) ..)
  85.     - rmdir stage1
  86.  
  87. de-stage2: force
  88.     - (cd stage2 ; mv -f $(STAGESTUFF) ..)
  89.     - rmdir stage2
  90.  
  91. de-stage3: force
  92.     - (cd stage3 ; mv -f $(STAGESTUFF) ..)
  93.     - rmdir stage3
  94.  
  95. tags etags: TAGS
  96.  
  97. TAGS: force
  98.     etags $(INCDIR)/*.h $(srcdir)/*.h $(srcdir)/*.c
  99.  
  100. clean:
  101.     rm -f *.[oa] *~ core *.E
  102.  
  103. clobber realclean: clean
  104.     rm -f libbfd.a TAGS
  105.  
  106. $(BFD_LIBS) $(BFD_BACKENDS):  libbfd.h $(BFD_H)
  107.  
  108. saber:
  109.     #suppress 65 on bfd_map_over_sections 
  110.     #suppress 66 on bfd_map_over_sections 
  111.     #suppress 67 on bfd_map_over_sections 
  112.     #suppress 68 on bfd_map_over_sections 
  113.     #suppress 69 on bfd_map_over_sections 
  114.     #suppress 70 on bfd_map_over_sections 
  115.     #suppress 110 in bfd_map_over_sections 
  116.     #suppress 112 in bfd_map_over_sections 
  117.     #suppress 530 
  118.     #suppress 590 in swap_exec_header 
  119.     #suppress 590 in _bfd_dummy_core_file_matches_executable_p 
  120.     #suppress 590 in bfd_dont_truncate_arname
  121.     #suppress 590 on ignore 
  122.     #suppress 590 on abfd 
  123.     #setopt load_flags $(CFLAGS)
  124.     #load $(CFILES)
  125.  
  126.  
  127. #-----------------------------------------------------------------------------
  128. #        'STANDARD' GNU/960 TARGETS BELOW THIS POINT
  129. #
  130. # 'VERSION' file must be present and contain a string of the form "x.y"
  131. #-----------------------------------------------------------------------------
  132.  
  133. ver960.c: FORCE
  134.     rm -f ver960.c
  135.     echo "char ${TARG}_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
  136.  
  137.  
  138. # This target should be invoked before building a new release.
  139. # 'VERSION' file must be present and contain a string of the form "x.y"
  140. #
  141. roll:
  142.     @V=`cat VERSION`        ; \
  143.     MAJ=`sed 's/\..*//' VERSION`    ; \
  144.     MIN=`sed 's/.*\.//' VERSION`    ; \
  145.     V=$$MAJ.`expr $$MIN + 1`    ; \
  146.     rm -f VERSION            ; \
  147.     echo $$V >VERSION        ; \
  148.     echo Version $$V
  149.  
  150. # Dummy target to force execution of dependent targets.
  151. #
  152. force:
  153.  
  154. install:
  155.     install -c libbfd.a $(libdir)
  156.     $(RANLIB) $(libdir)/libbfd.a
  157.  
  158. # Target to uncomment host-specific lines in this makefile.  Such lines must
  159. # have the following string beginning in column 1: #__<hostname>__#
  160. # Original Makefile is backed up as 'Makefile.old'.
  161. #
  162. # Invoke with:  make make HOST=xxx
  163. #
  164. make:
  165.     -@if test $(HOST)x = x ; then \
  166.         echo 'Specify "make make HOST=???"'; \
  167.         exit 1; \
  168.     fi ; \
  169.     grep -s "^#The next line was generated by 'make make'" Makefile; \
  170.     if test $$? = 0 ; then    \
  171.         echo "Makefile has already been processed with 'make make'";\
  172.         exit 1; \
  173.     fi ; \
  174.     mv -f Makefile Makefile.old; \
  175.     echo "#The next line was generated by 'make make'"     >Makefile ; \
  176.     echo "HOST=$(HOST)"                    >>Makefile ; \
  177.     echo                            >>Makefile ; \
  178.     sed "s/^#__$(HOST)__#//" < Makefile.old            >>Makefile
  179.  
  180. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
  181.     (cd $(srcdir) ; \
  182.         ./configure +norecurse \
  183.         +destdir=$(destdir) \
  184.         `if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
  185.         $(host) +target=$(target);)
  186.  
  187. dep: $(CFILES)
  188.     mkdep $(CFLAGS) $?
  189.  
  190.  
  191. # Stuff to make the documentation for bfd.
  192. #
  193. # make docs
  194. #    rebuilds the documentation. Has to be done when the source is
  195. #    modified until I work out how to do this properly
  196. # make docs headers
  197. #    rebuilds the header files from the source
  198. #
  199. # make docs texdoc
  200. #    rebuilds the bfd.dvi manual
  201. #
  202. # make docs texinfo
  203. #    rebuilts the bfdinfo manual
  204.  
  205.  
  206. .SUFFIXES: .doc .o .c .h .proto
  207.  
  208. .c.doc:
  209.     makedoc <$< doc/$*.doc doc/$*.proto doc/$*.protointernal doc/$*.drop
  210.  
  211. .h.doc:
  212.     makedoc <$< doc/$*.doc doc/$*.proto doc/$*.protointernal doc/$*.drop
  213.  
  214. .proto.doc:
  215.     makedoc <$< doc/$*.doc doc/$*.proto doc/$*.protointernal doc/$*.drop
  216.  
  217.  
  218. DSRC=$(CFILES)
  219.  
  220. docs: syms.doc bfd.doc cache.doc format.doc section.doc archive.doc \
  221.     core.doc libbfd.doc archures.doc reloc.doc opncls.doc \
  222.     targets.doc aoutx.doc coffcode.doc
  223.  
  224.  
  225. PROTOS = doc/opncls.proto doc/archures.proto doc/libbfd.proto doc/section.proto doc/syms.proto  doc/bfd.proto doc/archive.proto \
  226.     doc/reloc.proto doc/targets.proto doc/format.proto 
  227.  
  228.  
  229. headers : $(PROTOS)
  230.     - mkdir  doc
  231.     # Rebuild prototypes in bfd.h
  232.     sed <$(BFD_H) >bfd.h.new -e '1,/THE FOLLOWING/!d'
  233.     cat doc/opncls.proto doc/archures.proto \
  234.     doc/libbfd.proto doc/section.proto doc/syms.proto \
  235.     doc/bfd.proto doc/archive.proto \
  236.     doc/core.proto \
  237.     doc/reloc.proto doc/targets.proto doc/format.proto >>bfd.h.new
  238.     echo >> bfd.h.new
  239.     echo "#endif" >> bfd.h.new
  240.     echo >> bfd.h.new
  241.     mv bfd.h.new $(BFD_H)
  242.  
  243.     # and libbfd.h
  244.     sed < libbfd.h >libbfd.h.new -e '1,/THE FOLLOWING/!d'
  245.     cat  doc/libbfd.protointernal doc/cache.protointernal doc/reloc.protointernal  >> libbfd.h.new
  246.     echo >> libbfd.h.new
  247.     mv libbfd.h.new libbfd.h
  248.     
  249.     # and libcoff.h
  250.     sed < $(srcdir)/libcoff.h >libcoff.h.new -e '1,/THE FOLLOWING/!d'
  251.     cat doc/coffcode.proto >>libcoff.h.new
  252.     mv libcoff.h.new $(srcdir)/libcoff.h
  253.  
  254.  
  255. texinfo:
  256.     makeinfo +no-validate bfd.texinfo
  257.  
  258. texdoc:
  259.     tex bfd.texinfo
  260.     texindex bfd.??
  261.     tex bfd.texinfo
  262.     
  263. quickdoc: $(DSRC) docs
  264.     tex bfd.texinfo
  265.